<?php
namespace api\common\model;
use think\Db;
class ShopServer extends \think\Model 
{
    // 门店服务人员记录表
    protected $autoWriteTimestamp = true;
    protected $table = 'shop_server';
    /**
     * 根据门店id查看门店的服务人员数据
     * @param $shopId 门店id 
     * @return bool\data
     */
    public function selDetail($shopId){
        $field = array('*');
        $sel = Db::name($this->table)->field($field)->where('shopid',$shopId)->find();
        return $sel;
    }

    /**
     * 设置等待人数
     */
    public function setWatNum($shopId,$num){
        $data['waitingServer'] = $num;
        $data['updateTime'] = getNowDate();
        $res = Db::name($this->table)->where('shopid',$shopId)->update($data);
        return $res;
    }
}
